Shader "ProCamera2D/Letterbox"
{
  Properties
  {
    _MainTex ("Base (RGB)", 2D) = "white" {}
    _Top ("Top Bar", Range(0, 1)) = 1
    _Bottom ("Bottom Bar", Range(0, 1)) = 1
    _Color ("Base(RGB)", Color) = (1,1,1,1)
  }
  SubShader
  {
    Tags
    { 
    }
    Pass // ind: 1, name: 
    {
      Tags
      { 
      }
      ZTest Always
      ZWrite Off
      Cull Off
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_MatrixVP;
      uniform float4 _Color;
      uniform float _Top;
      uniform float _Bottom;
      uniform sampler2D _MainTex;
      struct appdata_t
      {
          float4 vertex :POSITION0;
          float2 texcoord :TEXCOORD0;
      };
      
      struct OUT_Data_Vert
      {
          float2 texcoord :TEXCOORD0;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float2 texcoord :TEXCOORD0;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      float4 u_xlat0;
      float4 u_xlat1;
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          out_v.vertex = UnityObjectToClipPos(in_v.vertex);
          out_v.texcoord.xy = in_v.texcoord.xy;
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      int u_xlatb0;
      float4 u_xlat10_1;
      int u_xlatb2;
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          u_xlatb0 = (in_f.texcoord.y<_Bottom);
          u_xlatb2 = (_Top<in_f.texcoord.y);
          u_xlatb0 = (u_xlatb2 || u_xlatb0);
          u_xlat10_1 = tex2D(_MainTex, in_f.texcoord.xy);
          out_f.color.xyz = (int(u_xlatb0))?(_Color.xyz):(u_xlat10_1.xyz);
          out_f.color.w = u_xlat10_1.w;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
  }
  FallBack "Diffuse"
}
